Skip to content

autosharding: add config parsing functionality - #9323

Merged
easwars merged 3 commits into
grpc:masterfrom
easwars:autosharding_lb_config_parsing
Aug 19, 2026
Merged

autosharding: add config parsing functionality#9323
easwars merged 3 commits into
grpc:masterfrom
easwars:autosharding_lb_config_parsing

Conversation

@easwars

@easwars easwars commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

RELEASE NOTES: none

@easwars easwars added Type: Feature New features or improvements in behavior Area: Resolvers/Balancers Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities. labels Aug 17, 2026
@easwars easwars added this to the 1.84 Release milestone Aug 17, 2026
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.16%. Comparing base (30ce1d5) to head (68bebcf).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
balancer/autosharding/autosharding.go 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9323      +/-   ##
==========================================
- Coverage   83.26%   83.16%   -0.11%     
==========================================
  Files         423      424       +1     
  Lines       35236    35286      +50     
==========================================
+ Hits        29341    29347       +6     
- Misses       4402     4433      +31     
- Partials     1493     1506      +13     
Files with missing lines Coverage Δ
balancer/autosharding/autosharding.go 88.23% <88.23%> (ø)

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@easwars

easwars commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

FYI: @pawbhard @shivaspeaks

@easwars

easwars commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the experimental autosharding load balancing policy, including its configuration parser and unit tests. The review feedback highlights two important improvements: first, implementing the isLoadBalancingConfig marker interface method directly on *lbConfig instead of embedding the interface to prevent potential nil pointer dereference panics; second, updating the validation error messages in ParseConfig to use camelCase field names to match the defined JSON tags.

Comment thread balancer/autosharding/autosharding.go
Comment thread balancer/autosharding/autosharding.go

@eshitachandwani eshitachandwani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo one comment

"google.golang.org/grpc/serviceconfig"
)

func TestParseConfig_Success(t *testing.T) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to make them functions of grpctest.Tester

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@easwars
easwars merged commit ce9c112 into grpc:master Aug 19, 2026
18 of 19 checks passed
@easwars
easwars deleted the autosharding_lb_config_parsing branch August 19, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Resolvers/Balancers Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities. Type: Feature New features or improvements in behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants